/** 
 * Project Name:mixc-pay-api 
 * File Name:PayType.java 
 * Package Name:com.crland.mixc.pay.api.constant 
 * Date:2016年9月3日下午2:49:54 
 * Copyright (c) 2016, crland.com.cn All Rights Reserved. 
 * 
*/  
  
package com.xf.lastmall.order.api.constant;



/** 
 * ClassName:支付方式 <br/> 
 * Date:     2016年9月3日 下午2:49:54 <br/> 
 * @author   ZHUANGWEILIANG1 
 * @version   
 * @see       
 */
public enum PayWay {
	
    ALIPAY_WEB(2, "支付宝web支付"),
    ALIPAY_APP(3, "支付宝手机app支付"),
	ALIPAY_MINIAPP(7, "支付宝小程序支付"),
    WECHAT_APP(4, "微信app支付"),
	POINT_APP(11, "万象星app支付"),
    ALIPAY_REFUND(80, "支付宝退款"),
	ALIPAY_BATCH_REFUND(82, "支付宝批量退款"),
	XIGUA_BATCH_REFUND(85, "西瓜批量退款"),
	ALIPAY_MIINAPP_BATCH_REFUND(87, "支付宝小程序批量退款"),
    WECHAT_REFUND(81, "微信退款"),
	WECHAT_BATCH_REFUND(83, "微信批量退款"),
	UNION_APP(50, "云闪付"),
	UNION_REFUND(51, "银联退款"),
	UNION_PAY_UNDO(52, "银联支付撤销"),
	PHONE_PAY(55, "手机支付"),
	APPLE_PAY(56, "Apple Pay"),
	XIGUA_PAY(13, "西瓜买单"),

	// 综合支付1.6.0
	PING_PULS_PULS_APP(5, "银联APP支付"),
	BAIDU_APP(6, "百度钱包APP支付"),
	UNION_PAY(30, "云闪付"),
	TIKTOK_MINIAPP(8, "抖音小程序支付"),
	TIKTOK_MINIAPP_REFUND(89, "抖音小程序退款"),
	DIGITAL_TREND(99, "数字化交易微信"),
	DIGITAL_TREND_ALIPAY(98, "数字化交易支付宝"),
	DIGITAL_TREND_REFUND(100, "数字化交易退款"),

	;

    private Integer value;
    private String text;

    PayWay(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}
	
    public static PayWay fromValue(Integer value) {
		if (value == null) {
			return null;
		}
		for (PayWay action : PayWay.values()) {
			if (action.getValue().intValue() == value.intValue()) {
				return action;
			}
		}
		return null;
	}

	public static String getText(Integer value) {
		for (PayWay action : PayWay.values()) {
			if (action.getValue().equals(value)) {
				return action.getText();
			}
		}
		return "";
	}
    
}
